<?php
declare (strict_types=1);

namespace app\admin\validate;

use think\Validate;

class GoodsValidate extends Validate
{
    /**
     * 定义验证规则
     * 格式：'字段名' =>  ['规则1','规则2'...]
     *
     * @var array
     */
    protected $rule = [
        'title|商品名称'   => 'require|max:15',
        'img|图片'       => 'require|max:100',
        'is_none|售罄状态' => 'require|in:1,2',
        'mobile|用户手机号' => 'require|mobile',
        'sign|状态'      => 'require|in:0,1',
        'price|价格'     => 'require|float|egt:0.1',
        'cate_id|场次'   => 'require|integer',
    ];

}
